home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Deutsche Edition 2
/
Deutsche Edition 2.iso
/
mac
/
POWERMAC
/
C64
/
SOURCE
/
Memory68K.h
< prev
next >
Wrap
Text File
|
1994-06-06
|
698b
|
30 lines
#undef ByteAt
#undef WordAt
#define ByteAt(addr,z) \
CLR.L D0 \
MOVE.W addr,D0 \
LSL.L #2,D0 \
MOVEA.L (rMEMORY,D0.L),A2 \
MOVE.B (A2),z
#define WordAt(addr,z) \
CLR.L D0 \
MOVE.W addr,D0 \
CLR.W z \
LSL.L #2,D0 \
MOVE.L (rMEMORY,D0.L),A2 \
MOVE.B (A2),z \
ADDQ.L #4,D0 \
MOVE.L (rMEMORY,D0.L),A2 \
MOVE.B (A2),D0 \
LSL.W #8,D0 \
OR.W D0,z
#ifdef COMMENT
#define ByteAt(addr) ((byte)*memory[addr])
#define WordAt(addr) ((word)*memory[addr]+(word)*memoryp1[addr]*256)
extern byte *RAM, *loROM, *hiROM, *charROM;
extern byte *RAMp1, *loROMp1, *hiROMp1, *charROMp1;
extern byte **memory, **memoryp1;
#endif